/*

 @name    : 锅巴汉化 - Web汉化插件
 @author  : 麦子、JAR、小蓝、好阳光的小锅巴
 @version : V0.6.1 - 2019-07-09
 @website : http://www.g8hh.com
 @idle games : http://www.gityx.com
 @QQ Group : 627141737

*/

//1.汉化杂项
var cnItems = {
    _OTHER_: [],

    //未分类：
    'Save': '保存',
    'Export': '导出',
    'Import': '导入',
    'Settings': '设置',
    'Achievements': '成就',
    'Statistics': '统计',
    'Changelog': '更新日志',
    'Hotkeys': '快捷键',
    'ALL': '全部',
    'Default': '默认',
    'AUTO': '自动',
    'default': '默认',
    "points": "点数",
    "Reset for +": "重置得到 + ",
    "Currently": "当前",
    "Effect": "效果",
    "Cost": "成本",
    "Goal:": "目标:",
    "Reward": "奖励",
    "Start": "开始",
    "Exit Early": "提前退出",
    "Finish": "完成",
    "Milestone Gotten!": "获得里程碑！",
    "Milestones": "里程碑",
    "Completed": "已完成",
    "Achievement Gotten!": "成就达成！",
    "[Budget:": "[预算：",
    "[Down ($": "[下 ($",
    "[Left]": "[左]",
    "[Money:": "[钱：",
    "[Prestige:": "[声望：",
    "[Right]": "[右]",
    "[Stop (Space)]": "[停止（空格）]",
    "[Up ($": "[上 ($",
    "Actual": "实际",
    "Actual Cursor": "实际光标",
    "Actual:": "实际：",
    "and": "和",
    "BaineGames": "BaineGames",
    "Be careful, that jolt costs money since cattle prods are not cheap!": "小心，这种颠簸是要花钱的，因为牛鞭并不便宜！",
    "Because we really didn't think you could do it, you don't really get a reward or anything other than a nice pat on the back.": "因为我们真的不认为你能做到，所以你并没有真正得到任何奖励或任何东西，除了一个很好的拍背。",
    "Begin the work!!": "开始工作！！",
    "Budget Multiplier": "预算乘数",
    "BugHunters": "Bug猎人",
    "BugHunters - Bugs Fixed:": "Bug猎人 - 已修复的错误：",
    "But can you do it faster?": "但是你能做得更快吗？",
    "Campaign Offers": "活动优惠",
    "Can you make this company efficient enough to run itself on a shoestring budget?": "你能让这家公司有足够的效率以低预算运行吗？",
    "Completion Bonus": "完成奖金",
    "Congrats again - GameHop": "再次恭喜 - GameHop",
    "Created by": "由...制作",
    "Debugging": "调试",
    "Delete save (no confirmation)": "删除保存（无确认）",
    "Delete save and restart": "删除保存重启",
    "Description": "描述",
    "Design": "设计",
    "Designs:": "设计：",
    "Development": "开发",
    "Development%3CmxGraphModel%3E%3Croot%3E%3...": "开发%3CmxGraphModel%3E%3Croot%3E%3...",
    "DevoDevs": "开发者",
    "DevoDevs - Focus:": "开发者 - 焦点：",
    "employees and patrons!": "员工和顾客！",
    "End the year": "结束这一年",
    "Finish your first year to see your report.": "完成您的第一年以查看您的报告。",
    "for the": "为了",
    "Gain 20% more prestige points (100 prestige points)": "获得 20% 更多声望点 (100 声望点)",
    "Gain 20% more prestige points (100)": "获得 20% 更多声望点 (100)",
    "his home.": "他的家。",
    "Holy Crap!": "哇靠！",
    "Honestly, we did not think you could do it. The last time we tried this with the previous guy, it took wayy longer and he eventually was sent back to": "老实说，我们认为你做不到。上次我们和前一个人尝试这个时，花了更长的时间，他最终被送回了",
    "If you need to put them on track, use the up and down arrow keys to jolt the BugHunters to the right lane.": "如果您需要让它们走上正轨，请使用向上和向下箭头键将 BugHunter 推向正确的车道。",
    "They have a reddit feed from r/softwaregore of all the bugs people find constantly flowing in.\n        They take their mighty Hammers of Code and bring down the wrath onto the bugs.\n        Watch them carefully as they don’t always stay in their own swimlane.": "他们有一个来自 r/softwaregore 的 reddit 提要，其中包含人们发现不断涌入的所有错误。\n 他们带着他们强大的代码之锤将愤怒降在错误身上。\n 仔细观察它们，因为它们并不总是留在 他们自己的泳道。",
    "When you see their focus sliding off, use the left and right arrow keys to send them our own GameHop Patent Pending Pill blend of Caffeine, Monstar Energy, and Soda Tarts that we like to call F.0.0.D.\n        F.0.0.D used to stand for what's in it, but our executive team changed that up and did not want to spend money on re-labeling old stock.": "当您看到他们的注意力滑落时，使用左右箭头键向他们发送我们自己的 GameHop 正在申请专利的咖啡因、Monstar Energy 和苏打蛋挞混合物，我们喜欢称之为 F.0.0.D。\n F.0.0 .D 曾经代表其中的内容，但我们的执行团队改变了这一点，不想花钱重新标记旧库存。",
    "Your new role as Budget Master Battle Royale Supervisor is simple!\n            Spend your money by the end of each year or lose it from your budget.\n            You have four teams that will help you do this automatically as time goes on.\n            But it is up to you how to best stretch every dollar.": "作为 预算大师大逃杀监督员 的新角色很简单！\n 在每年年底之前花掉你的钱，或者从预算中损失它。\n 随着时间的推移，你有四个团队将帮助你自动完成这项工作。\n 但这取决于您如何最好地利用每一美元。",
    "Jobs": "工作",
    "Just click start the campaigns you like and cancel on the ones you don’t.": "只需单击开始您喜欢的广告系列并取消您不喜欢的广告系列。",
    "Lane": "车道",
    "Let’s get you started and introduce you to your first team, our very own GameHop BugHunters!": "让我们开始向您介绍您的第一支团队，我们自己的 GameHop Bug猎人！",
    "Marketeers": "营销人员",
    "Marketeers - Fame:": "营销 - 名望：",
    "Marketing": "营销",
    "Meet the team!": "认识团队！",
    "New Budget": "新预算",
    "Option": "选项",
    "Our executives have opened up an expirimental prestige shop just for you to tinker around with. Check it out sometime.": "我们的高管开设了一家实验性的声望商店，供您摆弄。找个时间看看吧。",
    "Prestige\n                Points": "声望\n 点数",
    "Prestige Points": "声望点",
    "Prestige Shop": "声望商店",
    "Prestige Upgrades Multiplier": "声望升级乘数",
    "Previous Budget": "以前的预算",
    "Progress": "进度",
    "Report": "报告",
    "Setting": "设置",
    "slaves": "奴隶",
    "Start a\n        new\n        year": "开始\n 新的\n 一年",
    "Start a new year": "开始新的一年",
    "Surplus": "剩余",
    "Target": "目标",
    "Target Cursor": "目标光标",
    "Target:": "目标：",
    "Thanks for playing!": "感谢参与！",
    "The BugHunters team role is simple.": "BugHunters 团队的角色很简单。",
    "The Design team is basically a bunch of baristas from the local AstriskBucks with Wacon pens glued to their hands.": "设计团队基本上是一群来自当地 AstriskBucks 的咖啡师，手上粘着 Wacon 笔。",
    "The DevoDevs are the real blackbox of the company.": "DevoDevs 是公司真正的黑匣子。",
    "the dungeon": "地牢",
    "The Marketeers team is all about the PR. Not pull requests, but public relations!": "营销人员团队是关于公关的。不是拉请求，而是公共关系！",
    "They brainstorm ideas for the company and suggest campaigns for you to dump money on to gain the company some more fame, which attracts": "他们为公司集思广益，并建议您进行宣传活动，让您倾销资金以使公司获得更多名声，从而吸引",
    "They like to pump out a bunch of different designs for you to review.\n        You simply have to click what best title fits their design.": "他们喜欢抽出一堆不同的设计供您查看。\n 您只需点击最适合他们设计的标题即可。",
    "This job is locked!": "此工作未解锁！",
    "Total": "全部的",
    "Unlock Minigame Upgrades (10 prestige points)": "解锁小游戏升级（10 声望点）",
    "Unlock Minigame Upgrades (10)": "解锁小游戏升级 (10)",
    "Use CRT-style flickering": "使用 CRT 风格的闪烁",
    "Viewer does not support full SVG 1.1": "查看器不支持完整的 SVG 1.1",
    "We didn’t even bother to give them a cool name as they can't complain about it anyways!": "我们甚至都懒得给他们起一个很酷的名字，因为他们无论如何都不能抱怨！",
    "We just constantly make sure they have the right amount of coffee to keep them focused.\n        We give them caffeine and hold their razor keyboards hostage and they give us completed code!": "我们只是不断确保他们喝适量的咖啡以保持专注。\n 我们给他们咖啡因并扣押他们的剃须刀键盘，他们给我们完整的代码！",
    "Welcome to GameHop!": "欢迎来到 GameHop！",
    "Year": "年",
    "years!": "年！",
    "You did not meet the requirements for this year, so your budget will not shrink": "你没有达到今年的要求，所以你的预算不会缩水",
    "You have completed the game in": "你已经完成了游戏",
    "You win the game when you complete a year with a budget of $0": "当您以 $0 预算完成一年时，您就赢得了比赛",
    "Remember, they are designers, not managers like you so their ability to read and write, even speak, has been diminished purposefully with science to move all of those skill points to drawing.": "记住，他们是设计师，而不是像你这样的管理者，所以他们的读写能力，甚至说话的能力，都被科学有意地削弱了，以将所有这些技能点转移到绘画上。",
    "April": "四月 ",
    "August": "八月 ",
    "December": "十二月 ",
    "February": "二月 ",
    "IshaD": "IshaD",
    "July": "七月 ",
    "June": "六月 ",
    "March": "三月 ",
    "May": "五月 ",
    "November": "十一月 ",
    "October": "十月 ",
    "Quality Assurance - Fix bugs": "质量保证 - 修复Bug",
    "September": "九月 ",
    "January": "一月 ",
    "Development - Stay focused": "开发 - 保持专注",
    "Remove a lane": "删除一条车道",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",

    //树游戏
    'Loading...': '加载中...',
    'ALWAYS': '一直',
    'HARD RESET': '硬重置',
    'Export to clipboard': '导出到剪切板',
    'INCOMPLETE': '不完整',
    'HIDDEN': '隐藏',
    'AUTOMATION': '自动',
    'NEVER': '从不',
    'ON': '打开',
    'OFF': '关闭',
    'SHOWN': '显示',
    'Play Again': '再次游戏',
    'Keep Going': '继续',
    'The Modding Tree Discord': '模型树Discord',
    'You have': '你有',
    'It took you {{formatTime(player.timePlayed)}} to beat the game.': '花费了 {{formatTime(player.timePlayed)}} 时间去通关游戏.',
    'Congratulations! You have reached the end and beaten this game, but for now...': '恭喜你！ 您已经结束并通关了本游戏，但就目前而言...',
    'Main Prestige Tree server': '主声望树服务器',
    'Reach {{formatWhole(ENDGAME)}} to beat the game!': '达到 {{formatWhole(ENDGAME)}} 去通关游戏!',
    "Loading... (If this takes too long it means there was a serious error!": "正在加载...（如果这花费的时间太长，则表示存在严重错误！",
    'Loading... (If this takes too long it means there was a serious error!)←': '正在加载...（如果时间太长，则表示存在严重错误！）←',
    'Main\n\t\t\t\tPrestige Tree server': '主\n\t\t\t\t声望树服务器',
    'The Modding Tree\n\t\t\t\t\t\t\tDiscord': '模型树\n\t\t\t\t\t\t\tDiscord',
    'Please check the Discord to see if there are new content updates!': '请检查 Discord 以查看是否有新的内容更新！',
    'aqua': '水色',
    'AUTOMATION, INCOMPLETE': '自动化，不完整',
    'LAST, AUTO, INCOMPLETE': '最后，自动，不完整',
    'NONE': '无',
    'P: Reset for': 'P: 重置获得',
    'Git游戏': 'Git游戏',
    'QQ群号': 'QQ群号',
    'x': 'x',
    'QQ群号:': 'QQ群号:',
    '* 启用后台游戏': '* 启用后台游戏',
    '更多同类游戏:': '更多同类游戏:',
    'r/incremental_games': 'r/incremental_games',
    '': '',
    '': '',

}


//需处理的前缀
var cnPrefix = {
    "\n": "",
    "                   ": "",
    "                  ": "",
    "                 ": "",
    "                ": "",
    "               ": "",
    "              ": "",
    "             ": "",
    "            ": "",
    "           ": "",
    "          ": "",
    "         ": "",
    "        ": "",
    "       ": "",
    "      ": "",
    "     ": "",
    "    ": "",
    "   ": "",
    "  ": "",
    " ": "",
    //树游戏
    "\t\t\t": "\t\t\t",
    "\n\n\t\t": "\n\n\t\t",
    "\n\t\t": "\n\t\t",
    "\t": "\t",
    "Show Milestones: ": "显示里程碑：",
    "Autosave: ": "自动保存: ",
    "Offline Prod: ": "离线生产: ",
    "Completed Challenges: ": "完成的挑战: ",
    "High-Quality Tree: ": "高质量树贴图: ",
    "Offline Time: ": "离线时间: ",
    "Theme: ": "主题: ",
    "Anti-Epilepsy Mode: ": "抗癫痫模式：",
    "In-line Exponent: ": "直列指数：",
    "Single-Tab Mode: ": "单标签模式：",
    "Time Played: ": "已玩时长：",
    "Shift-Click to Toggle Tooltips: ": "Shift-单击以切换工具提示：",
    "Marketing is now free! (": "现在营销是免费的！ (",
    "Improve bug value by 25% (": "将Bug值提高 25% (",
    "Improve bug value by 50% (": "将Bug值提高 50% (",
    "Improve focus gain by 20% (": "将焦点增益提高 20% (",
    "Improve focus gain by 50% (": "将焦点增益提高 50% (",
    "Improve movement speed by 20% (": "移动速度提高 20% (",
    "Improve movement speed by 40% (": "移动速度提高 40% (",
    "Improve spawn rate by 20% (": "生成率提高 20% (",
    "Increase design value by 20% (": "设计值增加 20% (",
    "Increase design value by 50% (": "设计值增加 50% (",
    "Increase marketing Fame by 20% (": "提高营销声誉 20% (",
    "Increase marketing Fame gain by 50% (": "增加 50% 的营销声誉增益 (",
    "Increase marketing speed by 50% (": "将营销速度提高 50% (",
    "Increase prestige points gain by 25% (": "声望点增益提高 25% (",
    "Reduce all minigame upgrade costs by 20% (": "将所有小游戏升级成本降低 20%（",
    "Reduce all minigame upgrade costs by 25% (": "将所有小游戏升级成本降低 25%（",
    "Reduce all Yearly Requirements by 10% (": "将所有年度需求降低 10% (",
    "Reduce all Yearly Requirements by 20% (": "将所有年度需求降低 20% (",
    "Reduce design upgrade costs by 30% (": "将设计升级成本降低 30% (",
    "Reduce development upgrade cost by 30% (": "降低开发升级成本 30% (",
    "Reduce marketing cost by 50% (": "降低营销成本50%（",
    "Reduce marketing upgrade costs by 30% (": "降低营销升级成本30%（",
    "Reduce movement cost by 20% (": "移动成本降低 20% (",
    "Reduce prestige upgrade cost by 15% (": "声望升级成本降低 15% (",
    "Reduce target movement by 30% (": "减少目标移动 30% (",
    "Reduce the penalty for wrong answers by 1 (": "将错误答案的惩罚减少 1 (",
    "Remove an incorrect option (": "删除不正确的选项 (",
    "Remove movement cost (": "移除移动成本（",
    "Remove target movement (": "移除目标移动（",
    "Reduce all prestige upgrade costs by 10% (": "将所有声望升级成本降低 10% (",
    "Bugs spawning on one less lane (": "在少一条车道上生成的Bug（",
    "Improve bug value by ": "提高Bug价值 ",
    "Improve focus gain by ": "提高焦点增益 ",
    "Improve your movement speed by ": "提高你的移动速度 ",
    "Reduce the cost of switching lanes by ": "降低切换车道的成本 ",
    "Remove target movement by ": "移除目标移动 ",
    "Unlock Minigame Upgrades": "解锁小游戏升级",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
}

//需处理的后缀
var cnPostfix = {
    "                   ": "",
    "                  ": "",
    "                 ": "",
    "                ": "",
    "               ": "",
    "              ": "",
    "             ": "",
    "            ": "",
    "           ": "",
    "          ": "",
    "         ": "",
    "        ": "",
    "       ": "",
    "      ": "",
    "     ": "",
    "    ": "",
    "   ": "",
    "  ": "",
    " ": " ",
    "\n": "",
    "\n\t\t\t": "\n\t\t\t",
    "\t\t\n\t\t": "\t\t\n\t\t",
    "\t\t\t\t": "\t\t\t\t",
    "\n\t\t": "\n\t\t",
    "\t": "\t",
    " (Bought)": " (已购买)",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
}

//需排除的，正则匹配
var cnExcludeWhole = [
    /^(\d+)$/,
    /^\s*$/, //纯空格
    /^([\d\.]+)e(\d+)$/,
    /^([\d\.]+)$/,
    /^\$([\d\.]+)\]$/,
    /^([\d\.]+)\%$/,
    /^([\d\.]+)\/([\d\.]+)$/,
    /^([\d\.]+):([\d\.]+):([\d\.]+)$/,
    /^([\d\.]+) K$/,
    /^([\d\.]+) M$/,
    /^([\d\.]+) B$/,
    /^([\d\.]+)s$/,
    /^([\d\.]+)x$/,
    /^x([\d\.]+)$/,
    /^([\d\.,]+)$/,
    /^([\d\.,]+)\)$/,
    /^([\d\.,]+)x$/,
    /^x([\d\.,]+)$/,
    /^([\d\.]+)e([\d\.,]+)$/,
    /^e([\d\.]+)e([\d\.,]+)$/,
    /^x([\d\.]+)e([\d\.,]+)$/,
    /^([\d\.]+)e([\d\.,]+)x$/,
    /^[\u4E00-\u9FA5]+$/
];
var cnExcludePostfix = [
]

//正则替换，带数字的固定格式句子
//纯数字：(\d+)
//逗号：([\d\.,]+)
//小数点：([\d\.]+)
//原样输出的字段：(.+)
//换行加空格：\n(.+)
var cnRegReplace = new Map([
    [/^([\d\.]+) hours ([\d\.]+) minutes ([\d\.]+) seconds$/, '$1 小时 $2 分钟 $3 秒'],
    [/^You are gaining (.+) elves per second$/, '你每秒获得 $1 精灵'],
    [/^Bugs spawn (.+) more often$/, 'Bug产生的频率增加 $1'],
    [/^You have (.+) points$/, '你有 $1 点数'],
    [/^Next at (.+) points$/, '下一个在 $1 点数'],
	[/^([\d\.]+)\/sec$/, '$1\/秒'],
	[/^([\d\.,]+)\/sec$/, '$1\/秒'],
	[/^([\d\.,]+) OOMs\/sec$/, '$1 OOMs\/秒'],
	[/^([\d\.]+) OOMs\/sec$/, '$1 OOMs\/秒'],
	[/^([\d\.]+)e([\d\.,]+)\/sec$/, '$1e$2\/秒'],
    [/^requires ([\d\.]+) more research points$/, '需要$1个研究点'],
    [/^([\d\.]+)e([\d\.,]+) points$/, '$1e$2 点数'],
    [/^([\d\.]+) money$/, '$1 钱'],
    [/^([\d\.]+)e([\d\.,]+) elves$/, '$1e$2 精灵'],
    [/^([\d\.,]+) prestige points\)$/, '$1 声望点）'],
    [/^([\d\.,]+) elves$/, '$1 精灵'],
    [/^\*(.+) to electricity gain$/, '\*$1 到电力增益'],
    [/^Cost: (.+) points$/, '成本：$1 点数'],
    [/^Req: (.+) elves$/, '要求：$1 精灵'],
    [/^Req: (.+) \/ (.+) elves$/, '要求：$1 \/ $2 精灵'],
    [/^Usages: (\d+)\/$/, '用途：$1\/'],
    [/^workers: (\d+)\/$/, '工人：$1\/'],

]);